home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / instan1a / exists.bas < prev    next >
BASIC Source File  |  1999-10-01  |  257b  |  13 lines

  1. Attribute VB_Name = "Exists"
  2. Option Explicit
  3.  
  4.  
  5. Public Function FileExists(filename As String) As Integer
  6. Dim x As Integer
  7. On Error Resume Next
  8. x = Len(Dir(filename))
  9. If Err Or x = 0 Then FileExists = False Else FileExists = True
  10. End Function
  11.  
  12.  
  13.